#include <stdio.h>

int main()
{
    int m, n;
    double s = 0.0;
    scanf("%d %d", &m, &n);
    for (double i = m; i <= n; i++)
    {
        s += i * i + 1 / i;
    }
    printf("sum = %.6f", s);

    return 0;
}